<form method="post" action="/sys/user/edit" enctype="multipart/form-data" class="pageForm required-validate"
      onsubmit="return iframeCallback(this, pageRefresh)">
    <input type="hidden" id="id" name="id" th:value="${entity.id}">
    <input type="hidden" id="cmd5" name="cmd5" value="">
    <input type="hidden" id="uid" name="uid" value="">
    <input type="hidden" id="randomData" name="randomData" value="">
    <div class="ibox no-margins no-padding no-borders">
        <div class="ibox-title p-xs ljFixBoxTitle">
            <div class="btn btn-sm btn-primary pull-right" id="btnEditSubmit"><i class="fa fa-paste">提交编辑</i></div>
        </div>
        <div style="height:40px;"></div>
        <div class="ibox-content">
            <div class="row">
                <div class="form-group col-md-4">
                    <label>所属系统(<b class="text-danger">*</b>):</label>
                    <input type="text" class="form-control required" th:value="${sysSystem.systemName}" readonly>
                </div>
                <div class="form-group col-md-4">
                    <label>所属角色(<b class="text-danger">*</b>):</label>
                    <input type="text" class="form-control required" th:value="${sysGroup.groupName}" readonly>
                </div>
                <div class="form-group col-md-4">
                    <label>父资源(<b class="text-danger">*</b>):</label>
                    <input type="text" class="form-control required" th:value="${nick}" readonly>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="row">
                <div class="form-group col-md-6">
                    <label>登录账户(<b class="text-danger">*</b>):</label>
                    <input name="loginName" type="text" class="form-control required" maxlength="32" th:value="${entity.loginName}">
                </div>
                <div class="form-group col-md-6">
                    <label>账户昵称(<b class="text-danger">*</b>):</label>
                    <input name="userNick" type="text" class="form-control required" maxlength="32" th:value="${entity.userNick}">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-6">
                    <label>手机号码(<b class="text-danger">*</b>):</label>
                    <input name="userPhone" type="text" class="form-control required" maxlength="11" th:value="${entity.userPhone}">
                </div>
                <div class="form-group col-md-6">
                    <label>用户邮箱:</label>
                    <input name="userEmail" type="text" class="form-control required" maxlength="32" th:value="${entity.userEmail}">
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="row">
                <div class="form-group col-md-6">
                    <label>关联代理商(<b class="text-danger">*</b>):</label>
                    <div class="input-group">
                        <input type="hidden" id="mappingId" name="mappingId" th:value="${entity.mappingId}">
                        <input id="EditOrgBsSuggest" type="text" class="form-control input-sm OrgBsSuggest"
                               value="" refId="#mappingId">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-sm btn-white dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-search"></span>
                            </button>
                            <button type="button" class="btn btn-sm btn-white ClearOrgBsSuggest" refObj="#EditOrgBsSuggest">
                                <span class="fa fa-remove"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label>关联商户:</label>
                    <div class="input-group">
                        <input type="hidden" id="mappingUserId" name="mappingUserId" th:value="${entity.mappingUserId}">
                        <input id="EditUserBsSuggest" type="text" class="form-control input-sm UserBsSuggest"
                               value="" refId="#mappingUserId">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-sm btn-white dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-search"></span>
                            </button>
                            <button type="button" class="btn btn-sm btn-white ClearUserBsSuggest" refObj="#EditUserBsSuggest">
                                <span class="fa fa-remove"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label>关联合作商(<b class="text-danger">*</b>):</label>
                    <div class="input-group">
                        <input type="hidden" id="mappingSpId" name="mappingSpId" th:value="${entity.mappingSpId}">
                        <input id="AddSpBsSuggest" type="text" class="form-control input-sm SpBsSuggest"
                               value="" refId="#mappingSpId">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-sm btn-white dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-search"></span>
                            </button>
                            <button type="button" class="btn btn-sm btn-white ClearSpBsSuggest" refObj="#AddSpBsSuggest">
                                <span class="fa fa-remove"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label>关联通道(<b class="text-danger">*</b>):</label>
                    <div class="input-group">
                        <input type="hidden" id="mappingChannelId" name="mappingChannelId" th:value="${entity.mappingChannelId}">
                        <input id="AddChannelBsSuggest" type="text" class="form-control input-sm ChannelBsSuggest"
                               value="" refId="#mappingChannelId">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-sm btn-white dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-search"></span>
                            </button>
                            <button type="button" class="btn btn-sm btn-white ClearChannelBsSuggest" refObj="#AddChannelBsSuggest">
                                <span class="fa fa-remove"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label>关联代理(<b class="text-danger">*</b>):</label>
                    <div class="input-group">
                        <input type="hidden" id="mappingAgentId" name="mappingAgentId" th:value="${entity.mappingAgentId}">
                        <input id="AddAgentBsSuggest" type="text" class="form-control input-sm AgentBsSuggest"
                               value="" refId="#mappingAgentId">
                        <div class="input-group-btn">
                            <button type="button" class="btn btn-sm btn-white dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-search"></span>
                            </button>
                            <button type="button" class="btn btn-sm btn-white ClearAgentBsSuggest" refObj="#AddAgentBsSuggest">
                                <span class="fa fa-remove"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<div th:replace="system/suggest/OrgBsSuggest"></div>
<div th:replace="system/suggest/UserBsSuggest"></div>
<div th:replace="system/suggest/ChannelBsSuggest"></div>
<div th:replace="system/suggest/SpBsSuggest"></div>
<div th:replace="system/suggest/AgentBsSuggest"></div>
<script>
    jQuery(function ($) {
        $(".chosen-select").chosen();
        $("#btnEditSubmit").on("click", function () {
            var values = {};
            modifyVerf(values);
            $("#cmd5").val(values.cmd5);
            $("#uid").val(values.uid);
            $("#randomData").val(values.randomData);
            $(this).closest("form").submit();
        });
    });
</script>